#pragma once

#include "components.h"
#include "event.h"
#include "models.h"
#include "qbe/src/ecs/ecs.hpp"
#include "util.hpp"

#include "../../layout/layout.hpp"
#include "../../select/select_cmd.hpp"
#include "../../state/state.hpp"
#include "../../undoRedo/undoRedo.hpp"
#include "../../utils/kutils.h"
#include "qlib/all.h"

namespace qbe::editing::Drift {
void exit(ecs::Query query, state::AllModeType enter_mode);

void init(entt::registry& reg, ecs::Commands commands, ecs::Query query);

//偏移
void update(entt::registry& ecs_reg, ecs::Query query, ecs::Bus& bus);

void post(entt::registry& reg, ecs::Commands commands, ecs::Query query, ecs::Bus& bus);

class DriftPlugin : public ecs::Plugin {
 public:
  void build(ecs::App& app) override;
};
}  // namespace qbe::editing::Drift